﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;
using System.Data;
using System.Collections;
using Com.Crc.PoJo.Model.Resource;
using SnailGame.Utility.DataAccess;

namespace Com.Crc.ResManage.DAL.EquipManage
{
    public class AREAManagerDAL
    {
        DataBroker broker = new DataBroker();

        public System.Data.DataTable query(PoJo.Model.Resource.Dictionary.COMMON_DIC_TYPE areaType)
        {
            string strSql = "select isNull(a.s_up,-1)+'|'+isNull(a.s_down,-1)+'|'+cast(a.N_ID as varchar) as N_ID,a.S_NAME from dbo.TT_RESOURCE_AREA a where a.S_STATE='1'  and a.s_type='" + ((int)areaType) + "'";
            return broker.ExecuteQueryForOleDB(strSql, ConfigurationManager.ConnectionStrings["CRCAppConn"].ToString());
        }
    }
}
